$(document).ready(function() {
    /*====================================文件上传样式=====================================*/
    $('input[type=file]').bootstrapFileInput();
    $('.file-inputs').bootstrapFileInput();
    /*====================================学生信息分页=================================*/
    var numberOfPages;
    if ($("#totalPages").html() < 5) {
        numberOfPages = $("#totalPages").html();

    } else {
        numberOfPages = 5;
    }
    if($("#totalPages").html() !=0){
    var options = {
        currentPage: $("#currentPage").html(),
        totalPages: $("#totalPages").html(),
        numberOfPages: numberOfPages,
        alignment: "center",
        onPageClicked: function(e, originalEvent, type, page) {
        	if($("#currentCocourseCode").html()==""){
            location.href = "studentPaging?page=" + page;}
        	else
        		{
        		var cocourseCode = $("#courseName option:selected").val();
        	    var cid = $("#classes option:selected").val();
        		location.href="/Examination/admin/studentInfoByCourse?cocourseCode=" + cocourseCode + "&cid=" + cid + "&page=" + page;
        		}
        }
  
    };

    $('#example').bootstrapPaginator(options);
    }
})